package com.jh.user.pojo.payment;

import com.google.common.base.MoreObjects;
import org.hibernate.type.OrderedMapType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Objects;


/**
 * {@code PaymentOrderStatistic} entity DTO.
 *
 * @author Fuchun
 * @since 1.0
 */
public class PosDTO implements Serializable {

    private Long posId;
    private Long userId;
    private String orderType;
    private Integer dealNumber;
    private BigDecimal totalAmount;
    private BigDecimal totalProfit;
    private Integer weekOfYear;
    private LocalDateTime createTime;

    public Long getPosId() {
        return posId;
    }

    public void setPosId(Long posId) {
        this.posId = posId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getOrderType() {
        return orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    public Integer getDealNumber() {
        return dealNumber;
    }

    public void setDealNumber(Integer dealNumber) {
        this.dealNumber = dealNumber;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalProfit() {
        return totalProfit;
    }

    public void setTotalProfit(BigDecimal totalProfit) {
        this.totalProfit = totalProfit;
    }

    public Integer getWeekOfYear() {
        return weekOfYear;
    }

    public void setWeekOfYear(Integer weekOfYear) {
        this.weekOfYear = weekOfYear;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PosDTO posDTO = (PosDTO) o;
        return Objects.equals(posId, posDTO.posId) &&
                Objects.equals(userId, posDTO.userId) &&
                Objects.equals(orderType, posDTO.orderType) &&
                Objects.equals(dealNumber, posDTO.dealNumber) &&
                Objects.equals(totalAmount, posDTO.totalAmount) &&
                Objects.equals(totalProfit, posDTO.totalProfit) &&
                Objects.equals(weekOfYear, posDTO.weekOfYear) &&
                Objects.equals(createTime, posDTO.createTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(posId, userId, dealNumber, totalAmount, totalProfit, weekOfYear, createTime);
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(this)
                .add("posId", posId)
                .add("userId", userId)
                .add("orderType", orderType)
                .add("dealNumber", dealNumber)
                .add("totalAmount", totalAmount)
                .add("totalProfit", totalProfit)
                .add("weekOfYear", weekOfYear)
                .add("createTime", createTime)
                .toString();
    }
}
